package comxin.object;

import java.util.Objects;

public class Employee_Object{
    Integer id;
    String name;
    int salary;

    public Employee_Object() {
    }

    public Employee_Object(String name, int salary) {
        this.name = name;
        this.salary = salary;
    }
    public final boolean myEquals(Object otherObject){
        if (this==otherObject){
            return true;
        }
        if (otherObject==null){
            return false;
        }
        if (!(otherObject instanceof Employee_Object)){
            return false;
        }
        Employee_Object other = (Employee_Object) otherObject;
        return Objects.equals(this.name,other.name)&&this.salary==other.salary;
    }
}
